package com.shenmazong.cheat.controller;

import com.shenmazong.cheat.entity.TbExamCheat;
import com.shenmazong.cheat.entity.TbExamCheatType;
import com.shenmazong.cheat.service.ExamCheatService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import com.shenmazong.vo.ListParamVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


/**
 *controller Qi
 */
@RestController
public class ExamCheatController {

    @Autowired
    private ExamCheatService cheatService;

    /**
     * @description 作弊表新增
     * @params [tbExamCheat]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("saveExamCheat")
    public ResultResponse saveExamCheat(@RequestBody TbExamCheat tbExamCheat){
        return cheatService.saveExamCheat(tbExamCheat);
    }

    /**
     * @description 作弊表批量删除
     * @params [chooseIdVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("deleteExamCheat")
    public ResultResponse deleteExamCheat(@RequestBody BatchChooseIdVo chooseIdVo){
        return cheatService.deleteExamCheat(chooseIdVo);
    }

    /**
     * @description 作弊表修改
     * @params [tbExamCheat]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("updateExamCheat")
    public ResultResponse updateExamCheat(@RequestBody TbExamCheat tbExamCheat){
        return cheatService.updateExamCheat(tbExamCheat);
    }

    /**
     * @description 作弊表列表
     * @params [paramVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("listExamCheat")
    public ResultResponse listExamCheat(@RequestBody ListParamVo paramVo){
        return cheatService.listExamCheat(paramVo);
    }

    /**
     * @description 根据ID获取作弊表
     * @params [tbExamCheat]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("getExamCheat")
    public ResultResponse getExamCheat(@RequestBody TbExamCheat tbExamCheat){
        return cheatService.getExamCheat(tbExamCheat);
    }

    /**
     * @description 作弊类型表新增
     * @params [tbExamCheatType]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("saveExamCheatType")
    public ResultResponse saveExamCheatType(@RequestBody TbExamCheatType tbExamCheatType){
        return cheatService.saveExamCheatType(tbExamCheatType);
    }

    /**
     * @description 作弊类型表批量删除
     * @params [chooseIdVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:57
     */
    @PostMapping("deleteExamCheatType")
    public ResultResponse deleteExamCheatType(@RequestBody BatchChooseIdVo chooseIdVo){
        return cheatService.deleteExamCheatType(chooseIdVo);
    }

    /**
     * @description 作弊类型表修改
     * @params [tbExamCheatType]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:58
     */
    @PostMapping("updateExamCheatType")
    public ResultResponse updateExamCheatType(@RequestBody TbExamCheatType tbExamCheatType){
        return cheatService.updateExamCheatType(tbExamCheatType);
    }

    /**
     * @description 作弊类型表列表
     * @params [paramVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 13:58
     */
    @PostMapping("listExamCheatType")
    public ResultResponse listExamCheatType(@RequestBody ListParamVo paramVo){
        return cheatService.listExamCheatType(paramVo);
    }

    /**
     * @description 获取所有作弊类型
     * @params []
     * @return com.shenmazong.utils.ResultResponse
     * @author Qi
     * @date 2021/9/22 14:00
     */
    @PostMapping("listAllExamCheatType")
    public ResultResponse listAllExamCheatType(){
        return cheatService.listAllExamCheatType();
    }
}




